/*
 * DoctorOrderInfo.java
 * 
 * @version 1.0
 * CS 2340 Team 10: Cyberdyne Systems
 */

package edu.gatech.oad.cyberdoc.domain;

import java.util.logging.Logger;

/**
 * Represents a single line item of DoctorOrder
 * 
 * @author Miles Gantt
 * @version 1.0
 */
public class DoctorOrderInfo {
	/**
	 * The logger for this class.
	 */
	private static final Logger LOG;

	/**
	 * The name of the service provided.
	 */
	private String name;

	/**
	 * The perscriptions perscribed to the patient, if any.
	 */
	private String prescription;

	/**
	 * The lab work ordered.
	 */
	private String labWork;

	/**
	 * Any instructions the doctor provided to the patient.
	 */
	private String instructions;

	/**
	 * Any additional information provided by the doctor.
	 */
	private String otherInfo;

	static {
		LOG = Logger
				.getLogger("edu.gatech.oad.cyberdoc.domain.DoctorOrderInfo");
	}

	/**
	 * Creates a new doctor's order with the given items.
	 * 
	 * @param name
	 *            The name of something
	 * @param prescription
	 *            The patient's perscriptions
	 * @param labWork
	 *            The lab work ordered
	 * @param instructions
	 *            The instructions given to the patient by the doctor
	 * @param otherInfo
	 *            Other information provided by the doctor
	 */
	public DoctorOrderInfo(String name, String prescription, String labWork,
			String instructions, String otherInfo) {
		this.name = name;
		this.prescription = prescription;
		this.labWork = labWork;
		this.instructions = instructions;
		this.otherInfo = otherInfo;

		LOG.info("New DoctorOrderInfo \"" + name + "\" created.");
	}

	/**
	 * Returns a string representation of this DoctorOrderInfo.
	 * 
	 * The DoctorOrderInfo is displayed in the following format:
	 * 
	 * 
	 * @return This DoctorOrderInfo as a String
	 */
	@Override
	public String toString() {
		return name + prescription + labWork + instructions + otherInfo;
	}

	/**
	 * @return the name of the service provided
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name of the service provided
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the prescription
	 */
	public String getPrescription() {
		return prescription;
	}

	/**
	 * @param prescription
	 *            the prescription to set
	 */
	public void setPrescription(String prescription) {
		this.prescription = prescription;
	}

	/**
	 * @return the labWork
	 */
	public String getLabWork() {
		return labWork;
	}

	/**
	 * @param labWork
	 *            the labWork to set
	 */
	public void setLabWork(String labWork) {
		this.labWork = labWork;
	}

	/**
	 * @return the instructions
	 */
	public String getInstructions() {
		return instructions;
	}

	/**
	 * @param instructions
	 *            the instructions to set
	 */
	public void setInstructions(String instructions) {
		this.instructions = instructions;
	}

	/**
	 * @return the otherInfo
	 */
	public String getOtherInfo() {
		return otherInfo;
	}

	/**
	 * @param otherInfo
	 *            the otherInfo to set
	 */
	public void setOtherInfo(String otherInfo) {
		this.otherInfo = otherInfo;
	}
}
